support generation of xcode project files with qmake. (#760)
authortsteven4 <13596209+tsteven4@users.noreply.github.com>
Sun, 21 Nov 2021 20:34:23 +0000 (13:34 -0700)
committerGitHub <noreply@github.com>
Sun, 21 Nov 2021 20:34:23 +0000 (13:34 -0700)
GPSBabel.pro

index 0bd2a2696b5f8126c2cda61613d7b970d93b91fe..4cfbb7332727af025d32012a69f8558f6d56a70d 100644 (file)
@@ -213,18 +213,25 @@ win32-msvc* {
   QMAKE_EXTRA_COMPILERS += styles
 }
 
-load(configure)
-
 CONFIG(release, debug|release): DEFINES *= NDEBUG
 
 macx|linux|openbsd {
-  qtCompileTest(unistd) {
-    # this is used by zlib
+  if (equals(MAKEFILE_GENERATOR, XCODE)) {
+    # "Configure tests are not supported with the XCODE Makefile generator"
+    # assume we have the following headers
+    # these are used by zlib
     DEFINES += HAVE_UNISTD_H
-  }
-  qtCompileTest(stdarg) {
-    # this is used by zlib
     DEFINES += HAVE_STDARG_H
+  } else {
+    load(configure)
+    qtCompileTest(unistd) {
+      # this is used by zlib
+      DEFINES += HAVE_UNISTD_H
+    }
+    qtCompileTest(stdarg) {
+      # this is used by zlib
+      DEFINES += HAVE_STDARG_H
+    }
   }
   SOURCES += gbser_posix.cc
   HEADERS += gbser_posix.h